package Leetcode第一期;

/**
 * @author : K k
 * @date : 22:46 2020/9/4
 */
public class 爬楼梯_70 {
    public static int climbStairs(int n) {
        int a = 1;
        int b = 0;
        while (n != 0) {
            int tmp = a;
            a = a + b;
            b = tmp;
            n--;
        }
        return a;
    }

    public static void main(String[] args) {
        System.out.println(climbStairs(5));
        int[] res=new int[]{1,1,1,3,4,5,6};


    }
}
